
package com.fx.apartment.modules.house.wrapper;


import com.fx.apartment.modules.house.entity.IntoHouse;
import com.fx.apartment.modules.house.vo.IntoHouseVO;
import com.fx.apartment.common.support.BaseEntityWrapper;
import com.fx.apartment.common.tool.utils.BeanUtil;

import java.util.Objects;

/**
 * 入住管理包装类,返回视图层所需的字段
 *
 * @author QinXueFeng
 * @since 2021-04-19
 */
public class IntoHouseWrapper extends BaseEntityWrapper<IntoHouse, IntoHouseVO> {

	public static IntoHouseWrapper build() {
		return new IntoHouseWrapper();
 	}

	@Override
	public IntoHouseVO entityVO(IntoHouse intoHouse) {
		IntoHouseVO intoHouseVO = Objects.requireNonNull(BeanUtil.copy(intoHouse, IntoHouseVO.class));

		//User createUser = UserCache.getUser(intoHouse.getCreateUser());
		//User updateUser = UserCache.getUser(intoHouse.getUpdateUser());
		//intoHouseVO.setCreateUserName(createUser.getName());
		//intoHouseVO.setUpdateUserName(updateUser.getName());

		return intoHouseVO;
	}

}
